#include <iostream>
#include <zlib/eventsystem/I_EventSystem.h>
#include <unistd.h>

using namespace std;

class TestCont : public Continuation
{
public:
	TestCont()
	{
		SET_HANDLER(&TestCont::mainHandler);
	}

	int mainHandler(int event, void *data)
	{
		cout << "test" << endl;
		delete this;
	}
};


//debug testing ....
int main()
{
	EThread *t = new EThread(1);
	t->start("ET_TEST", NULL, NULL);
	TestCont *tc = new TestCont;
	tc->mutex = new_ProxyMutex();
	Event *e = new Event;
	e->init(tc, 0, 0);
	e->ethread = t;
	e->mutex = tc->mutex;
	
	e->ethread->notifyQueue.enqueue(e, true);

	sleep(10);
}
